package com.flyco.modules.sms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.flyco.modules.sms.entity.SmsDiscountProductCategoryRelation;
import com.flyco.modules.sms.mapper.SmsDiscountProductCategoryRelationMapper;
import com.flyco.modules.sms.service.ISmsDiscountProductCategoryRelationService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 满减满折分类关联
 * @Author: flyco
 * @Date:   2020-05-06
 * @Version: V1.0
 */
@Service
public class SmsDiscountProductCategoryRelationServiceImpl extends ServiceImpl<SmsDiscountProductCategoryRelationMapper, SmsDiscountProductCategoryRelation> implements ISmsDiscountProductCategoryRelationService {

    @Override
    public List<SmsDiscountProductCategoryRelation> queryCategoryRelationById (Long id) {
        LambdaQueryWrapper<SmsDiscountProductCategoryRelation> categoryQuery = new LambdaQueryWrapper<>();
        categoryQuery.eq(SmsDiscountProductCategoryRelation::getDiscountId,id);
        return this.list(categoryQuery);
    }
}
